local qunxian3__baishoukaiduo_daweide = fk.CreateSkill {

  name = "qunxian3__baishoukaiduo_daweide",

  tags = { Skill.Compulsory, },

}

Fk:loadTranslationTable {
  ["qunxian3__baishoukaiduo_daweide"] = "大威德",
  [":qunxian3__baishoukaiduo_daweide"] = [[锁定技，你的手牌数至少为你的体力值，当你因其他角色受到伤害而进入濒死状态时，
  你失去所有护甲对伤害来源造成本次受到伤害值的伤害。]],
  ["$qunxian3__baishoukaiduo_daweide"] = "大威德",
}

qunxian3__baishoukaiduo_daweide:addEffect(fk.AfterCardsMove, {
  anim_type = "drawcard",
  can_trigger = function(self, event, target, player, data)
    if player:hasSkill(qunxian3__baishoukaiduo_daweide.name) then
      for index, move in ipairs(data) do
        return player:getHandcardNum() < player.hp
      end
    end
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    player:drawCards(player.hp - player:getHandcardNum(), "qunxian3__baishoukaiduo_daweide")
  end
})

qunxian3__baishoukaiduo_daweide:addEffect(fk.EnterDying, {
  anim_type = "masochism",
  can_trigger = function(self, event, target, player, data)
    return target == player and data.damage and data.damage.from and data.damage.from ~= player and
        player:hasSkill("qunxian3__baishoukaiduo_daweide")
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    local num = player.shield
    room:changeShield(player, -num)
    room:damage({
      from = player,
      to = data.damage.from,
      damage = data.damage.damage,
      skillName = "qunxian3__baishoukaiduo_daweide"
    })
  end
})



return qunxian3__baishoukaiduo_daweide
